import React, { Component } from 'react'
import B from './B'
import { Context } from './context'

export default class A extends Component {
  render() {
    return (
      <Context.Consumer>
        {(value) => (
          <div>
            A: {value.count}
            <hr />
            <B />
          </div>
        )}
      </Context.Consumer>
    )
  }
}
